﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class Loading : MonoBehaviour
{
    Slider slider;//加载条
    // Start is called before the first frame update
    void Start()
    {
        DataManager.GetInstance.DataInit();
        slider = gameObject.GetComponent<Slider>();
    }

    // Update is called once per frame
    void Update()
    {
        changefill();
    }
    //leading进度条满（=1）时跳转到主页面
    public void changefill()
    {
        slider.value += 0.01f;
        if (slider.value >= 1)
        {
            GoToInterface.ToInterface("2EarlyStory");
        }
    }

}
